package cn.hznc.controller.exceltemplate;

import cn.hznc.controller.service.exceltemplate.ExportExcelTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author：Administrator
 * @Date：2024/2/28 17:21
 */
@RestController
@CrossOrigin(origins = "*", maxAge = 3600)
@RequestMapping("/excel")
@Slf4j
public class ExportExcelTemplateController{


    @Resource
    private ExportExcelTemplateService exportExcelTemplateService;

    /**
     * 导出智能柜当前库存统计excel模版
     *
     * @param response
     */
    @RequestMapping(value = "/exportICabinetStockTemplate", method = RequestMethod.GET)
    public void exportICabinetStockTemplate(HttpServletResponse response) {
        exportExcelTemplateService.exportICabinetStockTemplate(response);
    }

    /**
     * 导出一级库当前库存统计excel模版
     *
     * @param response
     */
    @RequestMapping(value = "/exportFirstCabinetStockTemplate", method = RequestMethod.GET)
    public void exportFirstCabinetStockTemplate(HttpServletResponse response) {
        exportExcelTemplateService.exportFirstCabinetStockTemplate(response);
    }

}
